$(function(){
	
	var $btnSave = $('#btnSave');
	$btnSave.click(function(){
		cateSave();
	});
	
});

function cateSave(){
	var $id 		= $('#hd_id');
	var $name 		= $('#name');
	var $parent 	= $('#parent');
	var $ord 		= $('#ord');
	var $disabled 	= $('#disabled');

	var id 			= $id.val();
	var name 		= $name.val();
	var parent 		= $parent.val();
	var ord 		= $ord.val();
	var disabled 	= $('input[name="disabled"]:checked').val();
	
	var params = {
		'id':id,
		'name':name,
		'parent':parent,
		'ord':ord,
		'disabled':disabled
	}

	$.post('/index.php/Admin/ArticleCate/update',params,function(data){
		if(data.success){
			alert('保存修改成功');
		}else{
			alert('保存修改失败');
		}
	},'json');
}